
package com.jf.cloud.common.constant;


/**
 * @author zz
 * @date 2020/12/30
 */
public enum SendTypeEnum {
    /**
     * 自定义消息
     */
    CUSTOMIZE(0, 0,"自定义消息", null, null),
    /**
     * 订单催付
     */
    PRESS_PAY(1, 1,"订单催付", null, null),

    /**
     * 付款成功通知
     */
    PAY_SUCCESS(2, 1,"付款成功通知", null, null),

    /**
     * 商家同意退款
     */
    AGREE_REFUND(3, 1,"商家同意退款", null, null),

    /**
     * 商家拒绝退款
     */
    REFUSE_REFUND(4, 1,"商家拒绝退款", null, null),

    /**
     * 核销提醒
     */
    WRITE_OFF(5, 1,"核销提醒", null, null),

    /**
     * 发货提醒
     */
    DELIVERY(6, 1,"发货提醒", null, null),

    /**
     * 拼团失败提醒
     */
    GROUP_FAIL(7, 1,"拼团失败提醒", null, null),

    /**
     * 拼团成功提醒
     */
    GROUP_SUCCESS(8, 1,"拼团成功提醒", null, null),

    /**
     * 拼团开团提醒
     */
    GROUP_START(9, 1,"拼团开团提醒", null, null),

    /**
     * 会员升级通知
     */
    MEMBER_LEVEL(10, 1,"会员升级通知", null, null),

    /**
     * 退款临近超时提醒
     */
    REFUND_OUT_TIME(11, 1,"退款临近超时提醒", null, null),
    /**
     * 用户注册验证码
     */
    REGISTER(12, 1,"用户注册验证码", null, null),
    /**
     * 发送登录验证码
     */
    LOGIN(13, 1,"发送登录验证码", null, null),
    /**
     * 修改密码验证码
     */
    UPDATE_PASSWORD(14, 1,"修改密码验证码", null, null),
    /**
     * 身份验证验证码
     */
    VALID(15, 1,"身份验证验证码", null, null),
    /**
     * 分销员申请成功
     */
    DISTRIBUTION_APPLY_SUCCESS(16, 1,"分销员申请成功", null, null),

    /**
     * 用户确认收货通知
     */
    RECEIPT_ORDER(102, 2,"商家端的用户确认收货通知", "订单", "用户确认收货后"),

    /**
     * 买家发起退款提醒
     */
    LAUNCH_REFUND(103, 2,"商家端的买家发起退款提醒", "订单", "用户申请售后，需要商家处理"),

    /**
     * 买家已退货提醒
     */
    RETURN_REFUND(104, 2,"商家端的买家已退货提醒", "订单", "买家已退货"),

    /**
     * 用户支付成功，发送给卖家
     */
    USER_PAY_SUCCESS(105, 2, "商家端的待发货提醒", "订单", "用户支付成功后,需要发货"),

    /**
     * 商品下架提醒
     */
    PRODUCT_OFFLINE(106, 2,"商家端的商品下架提醒", "商品", "平台下架商品后"),

    /**
     * 商品审核结果提醒
     */
    PRODUCT_AUDIT(107, 2,"商家端的商品审核结果提醒", "商品", "平台审核商品后"),

    /**
     * 代销商品变更提醒
     */
    COMMISSION_CHANGE(108, 2,"商家端的代销商品变更提醒", "商品", "供应商修改商品后"),




    /**
     * 待采购提醒
     */
    TO_PURCHASE(110, 2,"商家端的待采购提醒", "订单", "用户的实付金额低于供货价，这笔订单转成待采购订单时会给商家提醒"),




    /**
     * 营销活动下架
     */
    ACTIVITY_OFFLINE(112, 2,"商家端的营销活动下架", "营销", "平台下架营销活动后"),

    /**
     * 活动审核结果提醒
     */
    ACTIVITY_AUDIT(113, 2,"商家端的活动审核结果提醒", "营销", "平台审核营销活动后"),

    /**
     * 用户收款码支付成功，发送给卖家
     */
    USER_QRCODE_PAY_SUCCESS(114, 2, "商家端的收款提醒", "订单", "用户支付成功后商家确认"),

    //供应商
    /**
     * 用户确认收货通知
     */
    RECEIPT_ORDER_TO_SUPPLIER(1002, 3,"供应商端的用户确认收货通知", "订单", "用户确认收货后"),

    /**
     * 买家发起退款提醒
     */
    LAUNCH_REFUND_TO_SUPPLIER(1003, 3,"供应商端的买家发起退款提醒", "订单", "用户申请售后，需要商家处理"),

    /**
     * 买家已退货提醒
     */
    RETURN_REFUND_TO_SUPPLIER(1004, 3,"供应商端的买家已退货提醒", "订单", "买家已退货"),

    /**
     * 用户支付成功，发送给卖家
     */
    USER_PAY_SUCCESS_TO_SUPPLIER(1005, 3, "供应商端的待发货提醒", "订单", "用户支付成功后,需要发货"),

    /**
     * 商品下架提醒
     */
    PRODUCT_OFFLINE_TO_SUPPLIER(1006, 3,"供应商端的商品下架提醒", "商品", "平台下架商品后"),

    /**
     * 商品审核结果提醒
     */
    PRODUCT_AUDIT_TO_SUPPLIER(1007, 3,"供应商端的商品审核结果提醒", "商品", "平台审核商品后"),



    ;

    private final Integer value;
    /**
     * 0.自定义消息 1.为全部发送给用户消息，2.为发送给商家的 3.为发给供应商的
     */
    private final Integer type;
    private final String desc;
    private final String menu;
    private final String nodeName;

    public Integer getType() {
        return type;
    }
    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public String getMenu() {
        return menu;
    }

    public String getNodeName() {
        return nodeName;
    }

    SendTypeEnum(Integer value, Integer type, String desc, String menu, String nodeName) {
        this.value = value;
        this.type = type;
        this.desc = desc;
        this.menu = menu;
        this.nodeName = nodeName;
    }

    public static SendTypeEnum instance(Integer value) {
        SendTypeEnum[] enums = values();
        for (SendTypeEnum statusEnum : enums) {
            if (statusEnum.getValue().equals(value)) {
                return statusEnum;
            }
        }
        return null;
    }
}
